package mr.ali.webvideo.controller;


import com.github.pagehelper.PageInfo;
import mr.ali.webvideo.model.PrizesUser;
import mr.ali.webvideo.service.IPrizesUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Mr-ali
 * @since 2025-09-06
 */
@RestController
@RequestMapping("/h5/prizesUser")
public class PrizesUserController {
    @Resource
    private IPrizesUserService prizesUserService;

    @RequestMapping("/getPrizes")
    public PageInfo<PrizesUser> getPrizesUser(Integer pageNum, Integer pageSize, Integer userId) {
        return prizesUserService.getPrizesUserList(pageNum, pageSize, userId);
    }

    @GetMapping("/insert")
    public void insertPrizesUser(PrizesUser prizesUser) {
        prizesUserService.insertPrizesUser(prizesUser);
    }
}
